04. Spring Boot Exception Handling - Summary
035ND C01 L04 A08 EXCEPTION SUMMARY
Let’s recap these spring boot exception handling.
Create custom error page. -> create a error.html page, when errors happen, customer will be redirected to this page.
@ExceptionHandler. -> handle exceptions inside each controller.
@ControllerAdvice + @ExceptionHandler
Create a separate class and write all exceptions based on their types.Configure SimpleMappingExceptionResolver class ->
Rather than adding one method per exception, create a key-value pair class, and let system look for the error.Custom HandlerExceptionResolver class -> use reflection to find what type of exception it’s